<?php

namespace App\Http\Requests;

class ArticleAddRequest extends BasicRequest
{
    /**
     * Get the validation rules that apply to the request.
     *
     * @return array<string, mixed>
     */
    public function rules()
    {
        return [
            'title' => 'required',
            'synopsis' => 'required',
            'show_img_id' => 'required',
            'author' => 'required',
            'content' => 'required',
            'article_type_id' => 'required',
        ];
    }

    public function messages()
    {
        return [
            'title.required' => __('message.required',[
                'p' => __('key.article_title')
            ]),
            'show_img_id.required' =>  __('message.required',[
                'p' => __('key.article_show_img')
            ]),
            'synopsis.required' =>  __('message.required',[
                'p' => __('key.article_synopsis')
            ]),
            'author.required' =>  __('message.required',[
                'p' => __('key.author')
            ]),
            'content.required' => __('message.required',[
                'p' => __('key.article_content')
            ]),
            'article_type_id.required' => __('message.required',[
                'p' => __('key.article_type')
            ]),
        ];
    }

}
